from django.urls import path, include
from django.contrib.auth import views as auth_views
from rest_framework import routers
from admins.views import login, admin 
from django.views.decorators.csrf import csrf_exempt
from django.views.generic.base import TemplateView

app_name = 'admin'

urlpatterns = [
    path('admins/', admin.Admins.as_view({'get': 'list'}), name='admins'),
    path('admin/<int:pk>/', admin.Admin.as_view({'get': 'retrieve'}), name='admin'),
    path('admin/update/<int:pk>/', admin.Admin.as_view({'post': 'update'}), name='adminUpdate'),
    path('admin/create/', admin.Admin.as_view({'post': 'create'}), name='adminCreate'),
    path('admin/login', admin.Admin.as_view({'get': 'login'}), name='adminLogin'),
]